<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE HTML>

<ui:composition template="/dinamic/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:define name="conteudo">
		<h:form>  
		
			<p:dataTable var="assunto" value="#{postagemManagedBean.todosAssuntos}" >
				<p:column headerText="RECENTES">
					<p:panel styleClass="title2">
					<h:commandLink action="/dinamic/pages/manterPostagem/listarPostagensPorAssunto.xhtml" >
						<h:outputText value="#{assunto}"/>
					</h:commandLink>
					</p:panel>
				    <p:dataTable rows="3" var="postagens" value="#{postagemManagedBean.listarPostagemPorAssuntos(assunto)}">  
				        <p:column width="70%">
				        	<h:commandLink action="/dinamic/pages/manterPostagem/mostrarPostagem.xhtml" >
				           	 <h:outputText value="#{postagens.titulo}"/>
				            </h:commandLink>
				            <p:commandLink></p:commandLink>  
				        </p:column>  
				  
				        <p:column width="10%">  
				            <h:outputText value="#{postagens.dataPostagem}">
				            <f:convertDateTime pattern="hh:mm:ss"/>
				            </h:outputText>
				            <br/>
				            <h:outputText value="#{postagens.dataPostagem}">
				            <f:convertDateTime pattern="dd/MM/yyyy"/>
				            </h:outputText>  
				        </p:column>  
				  
				        <p:column width="20%">  
				            <h:outputText value="#{postagens.usuario.nome}" />  
				        </p:column>    
				    </p:dataTable>
				</p:column>  
			</p:dataTable>
		</h:form>
  
	</ui:define>
</ui:composition>